import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-04-13
 * Time: 11:26
 */
public class tcpDictServer extends TcpEcoserver{
    Map<String, String> map = new HashMap<>();
    public tcpDictServer( int port) throws IOException {
        super(port);
        map.put("cat","猫");
        map.put("bit","比特");
        map.put("go","狗");
        map.put("sb","傻比");
    }
    public String process(String str){
        return map.getOrDefault(str,"没找到");
    }

    public static void main(String[] args) throws IOException {
        tcpDictServer tcpDictServer = new tcpDictServer(9000);
        tcpDictServer.start();
    }
}
